Integrand size = 29, antiderivative size = 325 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {1}{16} \left (32 a^3 A b+24 a A b^3+8 a^4 B+36 a^2 b^2 B+5 b^4 B\right ) x+\frac {\left (24 a^4 A b+224 a^2 A b^3+32 A b^5-4 a^5 B+121 a^3 b^2 B+128 a b^4 B\right ) \sin (c+d x)}{60 b d}+\frac {\left (48 a^3 A b+232 a A b^3-8 a^4 B+178 a^2 b^2 B+75 b^4 B\right ) \cos (c+d x) \sin (c+d x)}{240 d}+\frac {\left (24 a^2 A b+32 A b^3-4 a^3 B+53 a b^2 B\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{120 b d}+\frac {\left (24 a A b-4 a^2 B+25 b^2 B\right ) (a+b \cos (c+d x))^3 \sin (c+d x)}{120 b d}+\frac {(6 A b-a B) (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d} \]
[Out]
Time = 0.56 (sec) , antiderivative size = 325, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {3047, 3102, 2832, 2813} \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {\left (-4 a^2 B+24 a A b+25 b^2 B\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{120 b d}+\frac {\left (-4 a^3 B+24 a^2 A b+53 a b^2 B+32 A b^3\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{120 b d}+\frac {\left (-8 a^4 B+48 a^3 A b+178 a^2 b^2 B+232 a A b^3+75 b^4 B\right ) \sin (c+d x) \cos (c+d x)}{240 d}+\frac {1}{16} x \left (8 a^4 B+32 a^3 A b+36 a^2 b^2 B+24 a A b^3+5 b^4 B\right )+\frac {\left (-4 a^5 B+24 a^4 A b+121 a^3 b^2 B+224 a^2 A b^3+128 a b^4 B+32 A b^5\right ) \sin (c+d x)}{60 b d}+\frac {(6 A b-a B) \sin (c+d x) (a+b \cos (c+d x))^4}{30 b d}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d} \]
[In]
[Out]
Rule 2813
Rule 2832
Rule 3047
Rule 3102
Rubi steps \begin{align*} \text {integral}& = \int (a+b \cos (c+d x))^4 \left (A \cos (c+d x)+B \cos ^2(c+d x)\right ) \, dx \\ & = \frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d}+\frac {\int (a+b \cos (c+d x))^4 (5 b B+(6 A b-a B) \cos (c+d x)) \, dx}{6 b} \\ & = \frac {(6 A b-a B) (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d}+\frac {\int (a+b \cos (c+d x))^3 \left (3 b (8 A b+7 a B)+\left (24 a A b-4 a^2 B+25 b^2 B\right ) \cos (c+d x)\right ) \, dx}{30 b} \\ & = \frac {\left (24 a A b-4 a^2 B+25 b^2 B\right ) (a+b \cos (c+d x))^3 \sin (c+d x)}{120 b d}+\frac {(6 A b-a B) (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d}+\frac {\int (a+b \cos (c+d x))^2 \left (3 b \left (56 a A b+24 a^2 B+25 b^2 B\right )+3 \left (24 a^2 A b+32 A b^3-4 a^3 B+53 a b^2 B\right ) \cos (c+d x)\right ) \, dx}{120 b} \\ & = \frac {\left (24 a^2 A b+32 A b^3-4 a^3 B+53 a b^2 B\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{120 b d}+\frac {\left (24 a A b-4 a^2 B+25 b^2 B\right ) (a+b \cos (c+d x))^3 \sin (c+d x)}{120 b d}+\frac {(6 A b-a B) (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d}+\frac {\int (a+b \cos (c+d x)) \left (3 b \left (216 a^2 A b+64 A b^3+64 a^3 B+181 a b^2 B\right )+3 \left (48 a^3 A b+232 a A b^3-8 a^4 B+178 a^2 b^2 B+75 b^4 B\right ) \cos (c+d x)\right ) \, dx}{360 b} \\ & = \frac {1}{16} \left (32 a^3 A b+24 a A b^3+8 a^4 B+36 a^2 b^2 B+5 b^4 B\right ) x+\frac {\left (24 a^4 A b+224 a^2 A b^3+32 A b^5-4 a^5 B+121 a^3 b^2 B+128 a b^4 B\right ) \sin (c+d x)}{60 b d}+\frac {\left (48 a^3 A b+232 a A b^3-8 a^4 B+178 a^2 b^2 B+75 b^4 B\right ) \cos (c+d x) \sin (c+d x)}{240 d}+\frac {\left (24 a^2 A b+32 A b^3-4 a^3 B+53 a b^2 B\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{120 b d}+\frac {\left (24 a A b-4 a^2 B+25 b^2 B\right ) (a+b \cos (c+d x))^3 \sin (c+d x)}{120 b d}+\frac {(6 A b-a B) (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {B (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d} \\ \end{align*}
Time = 2.88 (sec) , antiderivative size = 333, normalized size of antiderivative = 1.02 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {1920 a^3 A b c+1440 a A b^3 c+480 a^4 B c+2160 a^2 b^2 B c+300 b^4 B c+1920 a^3 A b d x+1440 a A b^3 d x+480 a^4 B d x+2160 a^2 b^2 B d x+300 b^4 B d x+120 \left (8 a^4 A+36 a^2 A b^2+5 A b^4+24 a^3 b B+20 a b^3 B\right ) \sin (c+d x)+15 \left (64 a^3 A b+64 a A b^3+16 a^4 B+96 a^2 b^2 B+15 b^4 B\right ) \sin (2 (c+d x))+480 a^2 A b^2 \sin (3 (c+d x))+100 A b^4 \sin (3 (c+d x))+320 a^3 b B \sin (3 (c+d x))+400 a b^3 B \sin (3 (c+d x))+120 a A b^3 \sin (4 (c+d x))+180 a^2 b^2 B \sin (4 (c+d x))+45 b^4 B \sin (4 (c+d x))+12 A b^4 \sin (5 (c+d x))+48 a b^3 B \sin (5 (c+d x))+5 b^4 B \sin (6 (c+d x))}{960 d} \]
[In]
[Out]
Time = 4.76 (sec) , antiderivative size = 242, normalized size of antiderivative = 0.74
method | result | size |
parts | \(\frac {\left (A \,b^{4}+4 B a \,b^{3}\right ) \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {\left (4 A a \,b^{3}+6 B \,a^{2} b^{2}\right ) \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {\left (6 A \,a^{2} b^{2}+4 B \,a^{3} b \right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (4 A \,a^{3} b +B \,a^{4}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {B \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}+\frac {\sin \left (d x +c \right ) a^{4} A}{d}\) | \(242\) |
parallelrisch | \(\frac {\left (960 A \,a^{3} b +960 A a \,b^{3}+240 B \,a^{4}+1440 B \,a^{2} b^{2}+225 B \,b^{4}\right ) \sin \left (2 d x +2 c \right )+\left (480 A \,a^{2} b^{2}+100 A \,b^{4}+320 B \,a^{3} b +400 B a \,b^{3}\right ) \sin \left (3 d x +3 c \right )+\left (120 A a \,b^{3}+180 B \,a^{2} b^{2}+45 B \,b^{4}\right ) \sin \left (4 d x +4 c \right )+\left (12 A \,b^{4}+48 B a \,b^{3}\right ) \sin \left (5 d x +5 c \right )+5 B \,b^{4} \sin \left (6 d x +6 c \right )+\left (960 a^{4} A +4320 A \,a^{2} b^{2}+600 A \,b^{4}+2880 B \,a^{3} b +2400 B a \,b^{3}\right ) \sin \left (d x +c \right )+1920 x d \left (A \,a^{3} b +\frac {3}{4} A a \,b^{3}+\frac {1}{4} B \,a^{4}+\frac {9}{8} B \,a^{2} b^{2}+\frac {5}{32} B \,b^{4}\right )}{960 d}\) | \(247\) |
derivativedivides | \(\frac {B \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {A \,b^{4} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {4 B a \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+4 A a \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+6 B \,a^{2} b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 A \,a^{2} b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {4 B \,a^{3} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+4 A \,a^{3} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{4} A \sin \left (d x +c \right )}{d}\) | \(316\) |
default | \(\frac {B \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {A \,b^{4} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {4 B a \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+4 A a \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+6 B \,a^{2} b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 A \,a^{2} b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {4 B \,a^{3} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+4 A \,a^{3} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{4} A \sin \left (d x +c \right )}{d}\) | \(316\) |
risch | \(2 x A \,a^{3} b +\frac {3 x A a \,b^{3}}{2}+\frac {9 x B \,a^{2} b^{2}}{4}+\frac {\sin \left (d x +c \right ) a^{4} A}{d}+\frac {5 \sin \left (d x +c \right ) A \,b^{4}}{8 d}+\frac {\sin \left (5 d x +5 c \right ) A \,b^{4}}{80 d}+\frac {3 \sin \left (4 d x +4 c \right ) B \,b^{4}}{64 d}+\frac {\sin \left (3 d x +3 c \right ) A \,a^{2} b^{2}}{2 d}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{3} b}{3 d}+\frac {5 \sin \left (3 d x +3 c \right ) B a \,b^{3}}{12 d}+\frac {\sin \left (2 d x +2 c \right ) A \,a^{3} b}{d}+\frac {\sin \left (2 d x +2 c \right ) A a \,b^{3}}{d}+\frac {3 \sin \left (2 d x +2 c \right ) B \,a^{2} b^{2}}{2 d}+\frac {9 \sin \left (d x +c \right ) A \,a^{2} b^{2}}{2 d}+\frac {3 \sin \left (d x +c \right ) B \,a^{3} b}{d}+\frac {5 \sin \left (d x +c \right ) B a \,b^{3}}{2 d}+\frac {\sin \left (5 d x +5 c \right ) B a \,b^{3}}{20 d}+\frac {\sin \left (4 d x +4 c \right ) A a \,b^{3}}{8 d}+\frac {3 \sin \left (4 d x +4 c \right ) B \,a^{2} b^{2}}{16 d}+\frac {5 b^{4} B x}{16}+\frac {5 \sin \left (3 d x +3 c \right ) A \,b^{4}}{48 d}+\frac {15 \sin \left (2 d x +2 c \right ) B \,b^{4}}{64 d}+\frac {a^{4} B x}{2}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{4}}{4 d}+\frac {B \,b^{4} \sin \left (6 d x +6 c \right )}{192 d}\) | \(404\) |
norman | \(\frac {\left (2 A \,a^{3} b +\frac {3}{2} A a \,b^{3}+\frac {1}{2} B \,a^{4}+\frac {9}{4} B \,a^{2} b^{2}+\frac {5}{16} B \,b^{4}\right ) x +\left (2 A \,a^{3} b +\frac {3}{2} A a \,b^{3}+\frac {1}{2} B \,a^{4}+\frac {9}{4} B \,a^{2} b^{2}+\frac {5}{16} B \,b^{4}\right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{3} b +9 A a \,b^{3}+3 B \,a^{4}+\frac {27}{2} B \,a^{2} b^{2}+\frac {15}{8} B \,b^{4}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{3} b +9 A a \,b^{3}+3 B \,a^{4}+\frac {27}{2} B \,a^{2} b^{2}+\frac {15}{8} B \,b^{4}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (30 A \,a^{3} b +\frac {45}{2} A a \,b^{3}+\frac {15}{2} B \,a^{4}+\frac {135}{4} B \,a^{2} b^{2}+\frac {75}{16} B \,b^{4}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (30 A \,a^{3} b +\frac {45}{2} A a \,b^{3}+\frac {15}{2} B \,a^{4}+\frac {135}{4} B \,a^{2} b^{2}+\frac {75}{16} B \,b^{4}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (40 A \,a^{3} b +30 A a \,b^{3}+10 B \,a^{4}+45 B \,a^{2} b^{2}+\frac {25}{4} B \,b^{4}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (16 a^{4} A -32 A \,a^{3} b +96 A \,a^{2} b^{2}-40 A a \,b^{3}+16 A \,b^{4}-8 B \,a^{4}+64 B \,a^{3} b -60 B \,a^{2} b^{2}+64 B a \,b^{3}-11 B \,b^{4}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {\left (16 a^{4} A +32 A \,a^{3} b +96 A \,a^{2} b^{2}+40 A a \,b^{3}+16 A \,b^{4}+8 B \,a^{4}+64 B \,a^{3} b +60 B \,a^{2} b^{2}+64 B a \,b^{3}+11 B \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {\left (240 a^{4} A -288 A \,a^{3} b +1056 A \,a^{2} b^{2}-168 A a \,b^{3}+112 A \,b^{4}-72 B \,a^{4}+704 B \,a^{3} b -252 B \,a^{2} b^{2}+448 B a \,b^{3}+5 B \,b^{4}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (240 a^{4} A +288 A \,a^{3} b +1056 A \,a^{2} b^{2}+168 A a \,b^{3}+112 A \,b^{4}+72 B \,a^{4}+704 B \,a^{3} b +252 B \,a^{2} b^{2}+448 B a \,b^{3}-5 B \,b^{4}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (400 a^{4} A -160 A \,a^{3} b +1440 A \,a^{2} b^{2}-40 A a \,b^{3}+208 A \,b^{4}-40 B \,a^{4}+960 B \,a^{3} b -60 B \,a^{2} b^{2}+832 B a \,b^{3}-75 B \,b^{4}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}+\frac {\left (400 a^{4} A +160 A \,a^{3} b +1440 A \,a^{2} b^{2}+40 A a \,b^{3}+208 A \,b^{4}+40 B \,a^{4}+960 B \,a^{3} b +60 B \,a^{2} b^{2}+832 B a \,b^{3}+75 B \,b^{4}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}\) | \(870\) |
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 243, normalized size of antiderivative = 0.75 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {15 \, {\left (8 \, B a^{4} + 32 \, A a^{3} b + 36 \, B a^{2} b^{2} + 24 \, A a b^{3} + 5 \, B b^{4}\right )} d x + {\left (40 \, B b^{4} \cos \left (d x + c\right )^{5} + 240 \, A a^{4} + 640 \, B a^{3} b + 960 \, A a^{2} b^{2} + 512 \, B a b^{3} + 128 \, A b^{4} + 48 \, {\left (4 \, B a b^{3} + A b^{4}\right )} \cos \left (d x + c\right )^{4} + 10 \, {\left (36 \, B a^{2} b^{2} + 24 \, A a b^{3} + 5 \, B b^{4}\right )} \cos \left (d x + c\right )^{3} + 32 \, {\left (10 \, B a^{3} b + 15 \, A a^{2} b^{2} + 8 \, B a b^{3} + 2 \, A b^{4}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (8 \, B a^{4} + 32 \, A a^{3} b + 36 \, B a^{2} b^{2} + 24 \, A a b^{3} + 5 \, B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 811 vs. \(2 (335) = 670\).
Time = 0.43 (sec) , antiderivative size = 811, normalized size of antiderivative = 2.50 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\begin {cases} \frac {A a^{4} \sin {\left (c + d x \right )}}{d} + 2 A a^{3} b x \sin ^{2}{\left (c + d x \right )} + 2 A a^{3} b x \cos ^{2}{\left (c + d x \right )} + \frac {2 A a^{3} b \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} + \frac {4 A a^{2} b^{2} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {6 A a^{2} b^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 A a b^{3} x \sin ^{4}{\left (c + d x \right )}}{2} + 3 A a b^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} + \frac {3 A a b^{3} x \cos ^{4}{\left (c + d x \right )}}{2} + \frac {3 A a b^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {5 A a b^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{2 d} + \frac {8 A b^{4} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 A b^{4} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {A b^{4} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {B a^{4} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {B a^{4} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {B a^{4} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {8 B a^{3} b \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {4 B a^{3} b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 B a^{2} b^{2} x \sin ^{4}{\left (c + d x \right )}}{4} + \frac {9 B a^{2} b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{2} + \frac {9 B a^{2} b^{2} x \cos ^{4}{\left (c + d x \right )}}{4} + \frac {9 B a^{2} b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{4 d} + \frac {15 B a^{2} b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{4 d} + \frac {32 B a b^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {16 B a b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {4 B a b^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {5 B b^{4} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {15 B b^{4} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {15 B b^{4} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {5 B b^{4} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {5 B b^{4} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {5 B b^{4} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} + \frac {11 B b^{4} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\left (c \right )}\right ) \left (a + b \cos {\left (c \right )}\right )^{4} \cos {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 307, normalized size of antiderivative = 0.94 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{4} + 960 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} b - 1280 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} b - 1920 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} b^{2} + 180 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} b^{2} + 120 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a b^{3} + 256 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a b^{3} + 64 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A b^{4} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{4} + 960 \, A a^{4} \sin \left (d x + c\right )}{960 \, d} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.81 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {B b^{4} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {1}{16} \, {\left (8 \, B a^{4} + 32 \, A a^{3} b + 36 \, B a^{2} b^{2} + 24 \, A a b^{3} + 5 \, B b^{4}\right )} x + \frac {{\left (4 \, B a b^{3} + A b^{4}\right )} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {{\left (12 \, B a^{2} b^{2} + 8 \, A a b^{3} + 3 \, B b^{4}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (16 \, B a^{3} b + 24 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (16 \, B a^{4} + 64 \, A a^{3} b + 96 \, B a^{2} b^{2} + 64 \, A a b^{3} + 15 \, B b^{4}\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} + \frac {{\left (8 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Time = 1.47 (sec) , antiderivative size = 403, normalized size of antiderivative = 1.24 \[ \int \cos (c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {B\,a^4\,x}{2}+\frac {5\,B\,b^4\,x}{16}+\frac {3\,A\,a\,b^3\,x}{2}+2\,A\,a^3\,b\,x+\frac {A\,a^4\,\sin \left (c+d\,x\right )}{d}+\frac {5\,A\,b^4\,\sin \left (c+d\,x\right )}{8\,d}+\frac {9\,B\,a^2\,b^2\,x}{4}+\frac {B\,a^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {5\,A\,b^4\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {A\,b^4\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {15\,B\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{64\,d}+\frac {3\,B\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{64\,d}+\frac {B\,b^4\,\sin \left (6\,c+6\,d\,x\right )}{192\,d}+\frac {A\,a\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {A\,a^3\,b\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {A\,a\,b^3\,\sin \left (4\,c+4\,d\,x\right )}{8\,d}+\frac {9\,A\,a^2\,b^2\,\sin \left (c+d\,x\right )}{2\,d}+\frac {5\,B\,a\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,a^3\,b\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {B\,a\,b^3\,\sin \left (5\,c+5\,d\,x\right )}{20\,d}+\frac {A\,a^2\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{2\,d}+\frac {3\,B\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {3\,B\,a^2\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{16\,d}+\frac {5\,B\,a\,b^3\,\sin \left (c+d\,x\right )}{2\,d}+\frac {3\,B\,a^3\,b\,\sin \left (c+d\,x\right )}{d} \]
[In]
[Out]